namespace eval ::Judgement {
	StartTCL::Provide

	variable ::Judgement::Spells
	array set ::Judgement::Spells {
		20154	20187
		20287	20280
		20288	20281
		20289	20282
		20290	20283
		20291	20284
		20292	20285
		20293	20286
		20375	20467
		20915	20963
		20918	20964
		20919	20965
		20920	20966
		20165	50090
		20347	50091
		20348	50092
		20349	50093
		20166	50094
		20356	50095
		20357	50096
		21082	21183
		21062	21088
		20305	20300
		20306	20301
		20307	20302
		20308	20303
		20271	0
	}
}
	proc ::Judgement::OnCastJudgement { to from spellid } {
		variable Seal
		if { $spellid == 20271 } {
			if { [ info exists Seal($from) ] && [expr ($Seal($from) > 0) ] } {
			  if { [expr ($Seal($from) < 50000 ) ] } {
					::CastSpell $from $to $Seal($from)
				} else {
					::CastSpell $from $from $Seal($from)
				}
				set Seal($from) 0
				return
			}
			return
		}
		set Seal($from) $::Judgement::Spells($spellid)
	}



proc ::Judgement::Init { } {
	if { [ info exists "::StartTCL::VERSION" ] } {
		::Custom::AddSpellScript "::Judgement::OnCastJudgement" [ array names ::Judgement::Spells ]
	} else {
		
	}
}

::Judgement::Init